<style>
    #login-button{
        background: #286090!important;
        color: white!important;
        border: 1px solid #286090!important;
        border-radius: 3px;
    }
</style>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>

<div class="span10">
    <div style="margin-bottom: 20px;">
        <a href="/index/index">首页</a><span >&gt;</span><span>banner管理</span><span >&gt;</span><span>添加/修改</span>
    </div>

    <form name="form" method="post" action="<?php echo baseUrl."/content/ad/add"?>" enctype="multipart/form-data">
        <table>
            <tr>
                <td width="80px">所属客户端 *:</td>
                <td>
                    <select name="type">
                        <option value ="">请添加所属客户端</option>
                        <option value ="1" <?php echo isset($data)&& $data['type']==1 ?  'selected':''?>>app</option>
                        <option value ="2" <?php echo isset($data)&& $data['type']==2 ?  'selected':''?>>wap</option>
                        <option value ="3" <?php echo isset($data)&& $data['type']==3 ?  'selected':''?>>pc</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td width="80px">位置 *:</td>
                <td>
                    <select name="cate">
                        <option value ="">请添加广告文案位置</option>
                        <option value ="1" <?php echo isset($data)&& $data['cate']==1 ?  'selected':''?>>顶部</option>
                        <option value ="2" <?php echo isset($data)&& $data['cate']==2 ?  'selected':''?>>中部</option>
                        <option value ="3" <?php echo isset($data)&& $data['cate']==3 ?  'selected':''?>>底部</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>名称:</td>
                <td>
                    <input  type="text" name="ad_name" value="<?php echo isset($data)? $data['ad_name']:''?>" />
                </td>
            </tr>
            <tr>
                <td>主题:</td>
                <td>
                    <input  type="text" name="title" value="<?php echo isset($data)? $data['title']:''?>" />
                </td>
            </tr>
            <tr>
                <td>注释:</td>
                <td>
                    <input  type="text" name="remark" value="<?php echo isset($data)? $data['remark']:''?>" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="right">
                    <input type="hidden" name='id' value="<?php echo isset($data)? $data['id']:''?>"/>
                    <button type="submit" id="login-button">添加/修改</button></td>
            </tr>
            <input type="hidden" name="_csrf" value="<?=Yii::$app->request->getCsrfToken()?>" />
        </table>
    </form>

</div>